package com.ruoyi.file.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;


/**
 * 上传成功回调请求对象
 *
 * @author ruoyi
 */
@Data
@Schema(name = "UploadCallbackRequest", description = "上传成功回调请求对象")
public class UploadCallbackRequest {

    /** 文件名 */
    @Schema(description = "文件名")
    @NotBlank(message = "文件名不能为空")
    @Size(max = 255, message = "文件名长度不能超过255个字符")
    private String fileName;

    /** 原始文件名 */
    @Schema(description = "原始文件名")
    @NotBlank(message = "原始文件名不能为空")
    @Size(max = 255, message = "原始文件名长度不能超过255个字符")
    private String originalName;

    /** 文件路径 */
    @Schema(description = "文件路径")
    @NotBlank(message = "文件路径不能为空")
    @Size(max = 500, message = "文件路径长度不能超过500个字符")
    private String filePath;

    /** 文件访问URL */
    @Schema(description = "文件访问URL")
    @Size(max = 1000, message = "文件访问URL长度不能超过1000个字符")
    private String fileUrl;

    /** 文件大小 */
    @Schema(description = "文件大小(字节)")
    private Long fileSize;

    /** 文件类型 */
    @Schema(description = "文件类型")
    @Size(max = 100, message = "文件类型长度不能超过100个字符")
    private String fileType;

    /** Content-Type */
    @Schema(description = "Content-Type")
    @Size(max = 100, message = "Content-Type长度不能超过100个字符")
    private String contentType;

    /** MD5哈希值 */
    @Schema(description = "MD5哈希值")
    @Size(max = 32, message = "MD5哈希值长度不能超过32个字符")
    private String md5Hash;

    /** 存储配置ID */
    @Schema(description = "存储配置ID")
    @NotNull(message = "存储配置ID不能为空")
    private Long configId;
}
